{
Get-Location
qmake -query
- # mimic creator shadow build to match Inno setup file
- $gpsbabel_build_dir = "build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release"
- $gui_build_dir = "build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release"
- # make sure we are staring with a clean build directory
- Remove-Item "..\$($gpsbabel_build_dir)" -Recurse -ErrorAction Ignore
- New-Item "..\$($gpsbabel_build_dir)" -type directory -force
- cd "..\$($gpsbabel_build_dir)"
- qmake ..\gpsbabel\GPSBabel.pro -spec win32-g++
- mingw32-make qmake_all
- mingw32-make
- if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- # copy GPSBabel.exe for use by test_script
- Remove-Item ..\gpsbabel\release -Recurse -ErrorAction Ignore
- New-Item ..\gpsbabel\release -type directory -force
- Copy-Item release\GPSBabel.exe ..\gpsbabel\release\GPSBabel.exe
- cd ..\gpsbabel
- # make sure we are staring with a clean build directory
- Remove-Item "$($gui_build_dir)" -Recurse -ErrorAction Ignore
- New-Item "$($gui_build_dir)" -type directory -force
- cd "$($gui_build_dir)"
- qmake ..\gui\app.pro -spec win32-g++
- mingw32-make qmake_all
- mingw32-make
- if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
- lupdate ..\gui\app.pro
- lrelease ..\gui\app.pro
- # windeployqt in 5.5.1 suffers from bug
- # https://bugreports.qt.io/browser/QTBUG-48946
- # which trashes the translations. Work around
- # by using the next version of windeployqt which had this
- # bug fixed.
- # use --plugindir option to locate the plugins.
- C:\Qt\5.6\mingw49_32\bin\windeployqt.exe --verbose 10 --plugindir release\plugins release\GPSBabelFE.exe
- & 'C:\Program Files (x86)\Inno Setup 5\ISCC.exe' ..\gui\setup.iss
- cd ..
+ & ".\tools\make_windows_release.ps1"
$sha=(git rev-parse --short HEAD)
Get-ChildItem .\gui\release\GPSBabel-*-Setup.exe | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabelTest-$($env:APPVEYOR_BUILD_VERSION)-$($sha)-Setup.exe" }
Get-ChildItem .\gui\release\GPSBabel-*-Manifest.txt | % { Push-AppveyorArtifact $_.FullName -FileName "GPSBabelTest-$($env:APPVEYOR_BUILD_VERSION)-$($sha)-Manifest.txt" }
--- /dev/null
+# Script to build and create windows installer.\r
+#\r
+# Run this from a Qt Desktop command window that has the Qt and mingw compiler paths set up,\r
+# such as the one Qt Creator will put on the start menu.\r
+# For example, to run overriding the default locations of windeployqt and ISSC:\r
+# powershell.exe -ExecutionPolicy Unrestricted -File tools\make_windows_release.ps1 -windeployqt "C:\Qt\5.6.3\mingw49_32\bin\windeployqt.exe" -iscc "C:\Program Files (x86)\Inno Setup 5\ISCC.exe"\r
+#\r
+# Be aware this script is used by appveyor.yml\r
+# \r
+# The defaults should be set for appveyor builds.\r
+Param(\r
+ $windeployqt = "C:\Qt\5.6\mingw49_32\bin\windeployqt.exe",\r
+ $iscc = "C:\Program Files (x86)\Inno Setup 5\ISCC.exe",\r
+ $gpsbabel_build_dir = "build-GPSBabel-Desktop_Qt_5_5_1_Mingw_32bit-Release",\r
+ $gui_build_dir = "build-app-Desktop_Qt_5_5_1_MinGW_32bit-Release"\r
+)\r
+# verify we are in the top of the gpsbabel clone\r
+Get-Item tools/make_windows_release.ps1 -ErrorAction Stop\r
+# mimic creator shadow build to match Inno setup file\r
+# make sure we are staring with a clean build directory\r
+Remove-Item "..\$($gpsbabel_build_dir)" -Recurse -ErrorAction Ignore\r
+New-Item "..\$($gpsbabel_build_dir)" -type directory -force\r
+cd "..\$($gpsbabel_build_dir)"\r
+qmake ..\gpsbabel\GPSBabel.pro -spec win32-g++\r
+mingw32-make qmake_all\r
+mingw32-make\r
+if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+# copy GPSBabel.exe for use by test_script\r
+Remove-Item ..\gpsbabel\release -Recurse -ErrorAction Ignore\r
+New-Item ..\gpsbabel\release -type directory -force\r
+Copy-Item release\GPSBabel.exe ..\gpsbabel\release\GPSBabel.exe\r
+cd ..\gpsbabel\r
+# make sure we are staring with a clean build directory\r
+Remove-Item "$($gui_build_dir)" -Recurse -ErrorAction Ignore\r
+New-Item "$($gui_build_dir)" -type directory -force\r
+cd "$($gui_build_dir)"\r
+qmake ..\gui\app.pro -spec win32-g++\r
+mingw32-make qmake_all\r
+mingw32-make\r
+if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
+lupdate ..\gui\app.pro\r
+lrelease ..\gui\app.pro\r
+# windeployqt in 5.5.1 suffers from bug\r
+# https://bugreports.qt.io/browser/QTBUG-48946\r
+# which trashes the translations. Work around\r
+# by using the next version of windeployqt which had this\r
+# bug fixed.\r
+# use --plugindir option to locate the plugins.\r
+& "$($windeployqt)" --verbose 10 --plugindir release\plugins release\GPSBabelFE.exe\r
+& "$($iscc)" ..\gui\setup.iss\r
+cd ..\r